<?php

$database = [
    'host' => 'localhost',
    'port' => 3306,
    'password' => ''
];
//array_merge  合并一个或者多个数组
//$database = array_merge($database,['user'=>'root','password'=>'1213456']);
//将数组中的所有键名修改为全大写或者全小写
$database = array_change_key_case($database,CASE_UPPER);
//将所有的键名全部转化为小写
$database = array_change_key_case($database,CASE_LOWER);

print_r(
  $database
);
